<div class="post">
    <h2 class="title">Profile</h2>
    <div class="entry">
        <script type="text/javascript">
            $(function() {
                $( "#debt_datepicker" ).datepicker({ dateFormat: 'yy-mm-dd' });
            });
        </script>
        <div class="info">
            <?php echo $message; ?>
        </div>
        <div class="error">
            <?php echo validation_errors(); ?>
        </div>
        <?= form_open_multipart('applicants/updateApplicant'); ?>
            <table>
                <tr class="darker"><td class="half">Surname</td><td><input type="text" class="wide" name="surname" value="<?php echo $profile->surname; ?>" /></td> </tr>
                <tr class="lighter"><td>First name</td><td><input type="text" class="wide"  name="first_name" value="<?php echo $profile->first_name; ?>" /></td> </tr>
                <tr  class="darker"><td>Other names</td><td><input type="text"  class="wide" name="other_names" value="<?php echo $profile->other_names; ?>" /></td> </tr>
                <tr class="darker"><td>Phone Number</td><td><input type="text" class="wide"  name="phone_number" value="<?php echo $profile->phone_number; ?>" /></td> </tr>
                <tr class="lighter"><td>Email</td><td><input type="text" class="wide"  name="email" value="<?php echo $profile->email; ?>" /></td> </tr>
                <tr class="darker"><td>ID or Passport Number</td><td><input type="text" class="wide"  name="idno" value="<?php echo $profile->idno; ?>" /></td> </tr>
                <tr class="darker"><td>Payroll number</td><td><input type="text" class="wide"  name="pay_roll_no" value="<?php echo $profile->pay_roll_no; ?>" /></td> </tr>
                <tr class="darker"><td>Date of employment</td><td><input type="text" class="wide" id="debt_datepicker"  name="date_of_employment" value="<?php echo $profile->date_of_employment; ?>" /></td> </tr>
                <tr class="lighter"><td>Department</td><td>
                        <select name='dept_id'>
                            <option value=''>Select Department</option>
                        <?php foreach ($departments as $value): ?>
                            <option value="<?= $value->tid; ?>"
                        <?php if ($profile->dept_id == $value->tid) {
                        ?> selected="1"<?php } ?>
                                ><?= $value->name; ?></option>
                                <?php endforeach; ?>
                    </select>
                </td> </tr>
            <tr><td colspan="2" style="text-align: right"><input type="submit" value="Update" /></td></tr>
        </table>
        </form>
    </div>
</div>